<?php
/**
 * Created by PhpStorm.
 * User: 盛茂国
 * Tel: 18394333958
 * Date: 2020/6/2
 * Time: 10:31
 */

namespace app\admin\controller\user;


use app\common\controller\Backend;

class Statistics extends Backend
{
    protected $noNeedLogin=['index'];
    protected $noNeedRight=[];


    public function index(){
        return $this->fetch('index');
    }
    //统计平台总会员
    public function sumuser(){
        return db('user')->count();
    }
    //统计普通会员数 绑定了手机号的会员
    public function genuser(){
        return db('user')->where('mobile','not null')->count();
    }
    //统计平台今日新增会员
    public function todayuser(){
        return db('user') ->whereTime('createtime', 'today')->count();
    }
}